﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Parlez.Routing
{
    public class ParlezMVCApplication : System.Web.HttpApplication
    {
        public ParlezMVCApplication()
        {
            //var _CurrentContext_HttpContextBase = new HttpContextWrapper(HttpContext.Current);
            //if (_CurrentContext_HttpContextBase != null)
            //{
            //    var _ExistingRoutes_List = RouteTable.Routes.Where(r => r.GetRouteData(_CurrentContext_HttpContextBase).GetRouteName() == "Localization").ToList();
            //    if (_ExistingRoutes_List == null || _ExistingRoutes_List.Count == 0)
            //    {
            //        RouteTable.Routes.MapRoute(
            //            "Localization",
            //            "{lang}/{controller}/{action}/{id}",
            //            new { controller = "Home", action = "Index", id = UrlParameter.Optional },
            //            new { lang = @"\w{2,3}(-\w{4})?(-\w{2,3})?" }
            //        );
            //    }
            //}
        }
    }
}
